import axios from "@/utils/axios.js";

export function doLogin(data) {
    return axios({
        method: "post",
        url: "/adminapi/login",
        data
    })
}
// 获取导航数据
export function typeHeader() {
    return axios({
        method: "get",
        url: "/adminapi/product/product/type_header",
    })
}
// export function menusList() {
//     return axios({
//         method: "get",
//         url: "/adminapi/menusList",
//     })
// }
export function productList(data) {
    return axios({
        method: "get",
        url: "/adminapi/product/product?page=" + data.page + "&limit=" + data.limit + "&cate_id=&type=" + data.type + "&store_name=&excel=0",
    })
}
export function isShow(data) {
    return axios({
        method: "put",
        url: "/adminapi/product/product/set_show/" + data.id + "/" + data.is_show,
    })
}
// 状态
export function is_Show(data) {
    return axios({
        method: "put",
        url: "/adminapi/user/user_level/set_show/" + data.id + "/" + data.is_show,
    })
}
// 会员信息+搜索
export function vipList(data) {
    return axios({
        method: "get",
        url: "/adminapi/user/user_level/vip_list?is_show=" + data.is_show + "&title=" + data.title + "&page=" + data.page + "&limit= " + data.limit
    })
}
// 图片上传
export function upload(data) {
    return axios({
        method: "post",
        url: "/adminapi/file/upload",
        data
    })
}
// 添加
export function AdduserLevel(data) {
    return axios({
        method: "post",
        url: "/adminapi/user/user_level.html",
        data
    })
}
// 删除
export function delectFun(data) {
    return axios({
        method: "put",
        url: "/adminapi/user/user_level/delete/" + data.id,
        data
    })
}
// 退出登录
export function tcDl() {
    return axios({
        method: "get",
        url: "/adminapi/setting/admin/logout",

    })
}